/**
 * 
 */
package net.phoenix.repository.property;

import javax.jcr.Value;
import javax.jcr.nodetype.PropertyDefinition;

import net.phoenix.repository.BasicNode;

/**
 * @author lixf
 *
 */
public class NameProperty extends BasicProperty {
	
	/**
	 * create single value property
	 * 
	 * @param node
	 * @param definition
	 * @param value
	 */
	public NameProperty(BasicNode node, PropertyDefinition definition, Value value) {
		super(node, definition, value);

	}

	/**
	 * create multiple values property
	 * 
	 * @param node
	 * @param definition
	 * @param values
	 */
	public NameProperty(BasicNode node, PropertyDefinition definition, Value[] values) {
		super(node, definition, values);
	}

	/**
	 * create a property with default value;
	 * 
	 * @param node
	 * @param definition
	 */
	public NameProperty(BasicNode node, PropertyDefinition definition) {
		super(node, definition);

	}
	

//	/**
//	 * 建立索引
//	 */
//	public void index(Document document) throws RepositoryException {
//		PropertyDefinition definition =  this.getDefinition();
//		if(definition==null)
//			return;
//		if(definition.isFullTextSearchable()){
//			for(Value value: this.values){
//				document.add(new Field(getName(),value.getString(), Field.Store.YES, Field.Index.NOT_ANALYZED));
//			}
//		}
//	}

}